package com.tuanzi.loan.web.lazy.settlement;

import com.tuanzi.loan.business.service.settlement.SettlementUvRecordService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.settlement.SettlementUvReportRequest;
import com.tuanzi.loan.vo.response.settlement.SettlementUvReportResponse;
import org.springframework.data.domain.Page;

/**
 * @author caiwanlin
 * @create 2018-03-27 15:19
 */
public class SettlementUvReportLazyDataModel extends BaseLazyDataModel<SettlementUvReportRequest,SettlementUvReportResponse> {

    private SettlementUvRecordService settlementUvRecordService = SpringContextHolder.getBean(SettlementUvRecordService.class);
    public SettlementUvReportLazyDataModel(SettlementUvReportRequest settlementUvReportRequest) {
        super(settlementUvReportRequest);
    }

    @Override
    protected Page<SettlementUvReportResponse> doLoad(PageSearcher<SettlementUvReportRequest> pageSearcher) {
        return settlementUvRecordService.list(pageSearcher);
    }
}
